﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Sinacor.Service.Infra.AuthorizationService.Service.ServiceImplementation.Translator
{
	public static class TranslateBetweenCompany
	{
		public static DataContract.Response.CompanyResponse ToDataContract(BusinessEntity.Company from)
		{
			DataContract.Response.CompanyResponse to = new DataContract.Response.CompanyResponse();
			to.Id = from.Id;
			to.Name = from.Name;
			to.CGC = from.CGC;
            to.DbInstance = from.DbInstance;
            to.DbUser = from.DbUser;
			return to;
		}

		public static List<DataContract.Response.CompanyResponse> ToDataContractList(List<BusinessEntity.Company> from)
		{
			List<DataContract.Response.CompanyResponse> to = new List<DataContract.Response.CompanyResponse>();
			foreach (BusinessEntity.Company item in from)
			{
				to.Add(ToDataContract(item));
			}
			return to;
		}
	}
}